<link rel="stylesheet" href="{{ URL::asset('/ucenter/css/base.css') }}">
<link rel="stylesheet" href="{{ URL::asset('/ucenter/css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ URL::asset('/ucenter/css/personCenter.css') }}">
<style>
/*新的个人中心订阅大师 样式*/
.L_gendan .L_gdtitle {
    height: 50px;
    background: #1d2634;
}
.L_gendan .L_gdtitle ul li {
    float: left;
    font-size: 12px;
    color: #fff;
}
.L_gendan .L_gdtitle{
    height: 50px;
    margin-top: 30px;
    background: #1e2635;
    padding-left: 40px;
}
.L_gendan .L_gdtitle ul li {
    float: left;
    font-size: 12px;
    color: #fff;
    width: 50px;
    height: 24px;
    text-align: center;
    margin-top: 15px;
    border-radius: 2px;
    cursor: pointer;
}
.L_gendan .L_gdtitle ul li.active {
    color: #fff;
    background: #3b9ce0;
    border-radius: 2px;
    line-height: 24px;
    margin-top: 12px;
}
.L_gendan .L_gdtitle ul li.line {
    width: 1px;
    height: 14px;
    background: #88888b;
    margin-right: 10px;
    margin-left: 10px;
}
.L_gendan .L_gdtitle ul li:nth-child(1),
.L_gendan .L_gdtitle ul li:nth-child(6) {
    color: #88888b;
}
.L_gendan .L_gdtitle ul li:nth-child(8),
.L_gendan .L_gdtitle ul li:nth-child(9),
.L_gendan .L_gdtitle ul li:nth-child(10) {
    width: 66px;
}
.L_gendan .L_gdtitle ul li:nth-child(6),
.L_gendan .L_gdtitle ul li:nth-child(10) {
    margin-left: 50px;
}
.L_gendan .L_gdtitle ul li select {
    width: 102px;
    height: 24px;
    background: #fff;
    font-size: 12px;
    color: #3b9ce0;
    outline:none;
}
.L_gendan .L_gdtitle ul select option {
    color: #20222c;
}
/* 选中的时候 背景颜色 */
.jybjcolor {
    background-color: #3b9ce0;
}
/* 默认全部有背景颜色 */
.L_gendan .L_gdtitle ul li.jybjcolor {
    background: #3b9ce0;
}
/* 下面列表 */
.L_gdcontent {
    width: 118%;
}
.L_gdcontent div {
    height: 54px;
    line-height: 46px;
    border-bottom: 1px solid #242630;
    margin-left: 20px;
}
.L_gdcontent div li:first-child {
    width: 145px;
    border-radius: 50%;
}
.L_gdcontent div li:first-child span {
    float: left;
}
.L_gdcontent div li:first-child span:first-child {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.L_gdcontent div li:first-child span:first-child img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}
.L_gdcontent div ul li {
    float: left;
    color: #88888b;
    width: 9%;
    height: 54px;
    text-align: center;
    font-size: 12px;
}
.L_gdcontent div ul li:nth-child(4) {
    width: 11%;
}
.L_gdcontent div ul li p {
    line-height: 27px;
}
/* 分页 */
.L_gdcontent .L_page{
    padding-top: 35px;
    border-bottom: 0px solid #242630;
    padding-left: 57%;
}
.L_gdcontent .L_page span {
    color: #fff;
    font-size: 12px;
}
.L_gdcontent .L_page span.fpage {
    display: inline-block;
    width: 56px;
    height: 24px;
    background: #555f79;
    color: #fff;
    text-align: center;
    line-height: 24px;
    border-radius: 3px;
    cursor: pointer;
}
</style>
<script src="{{ URL::asset('public_js/jquery-3.2.1.min.js') }}"></script>
<script src="{{ URL::asset('public_js/bootstrap.min.js') }}"></script>
<script>
    function gotohistory(pagetype,page,type){
        if(pagetype == 0) {
            var url = "?page="+(page-1)+"&type="+type;
        }else{
            var url = "?page="+(page+1)+"&type="+type;
        }
        url = '{{url("/newhistoryfollow")}}'+url;
        $(window.parent.document).find("#historyiframeMain").attr("src",url);
    }
</script>
<div class="L_gendan">
    <div class="L_gdtitle">
        <ul>
            <li>按类型</li>
            <li class="line"></li>
            <li @if(!$type) class="active" @endif style="margin-left: 5px" onclick='$(window.parent.document).find("#historyiframeMain").attr("src","{{url('/newhistoryfollow')}}")'>全部</li>
            <li @if($type == 1) class="active" @endif onclick='$(window.parent.document).find("#historyiframeMain").attr("src","{{url('/newhistoryfollow?type=1')}}")'>正向</li>
            <li @if($type == 2) class="active" @endif onclick='$(window.parent.document).find("#historyiframeMain").attr("src","{{url('/newhistoryfollow?type=2')}}")'>反向</li>
        </ul>
    </div>
    @if($historyfollowdata)
    <div class="L_gdcontent">
        <div>
            <ul>
                <li>分析师</li>
                <li>策略方向</li>           
                <li>累计交易笔数</li>
                <li>最近交易时间</li>
                <li>最大盈利</li>
                <li>最大亏损</li>
                <li>订阅盈亏</li>
                <li>单均</li>
        </div>
        @foreach($historyfollowdata as $hkey=>$hval)
            <div>
                <ul>
                    <li>
                        <div>
                            <a href="{{url('/analysthome?id='.$hval->id)}}" target="_blank" style="cursor:pointer;color:#bbbbbb;">
                                <span><img src="{{$hval->photo ? $hval->photo : URL::asset('ucenter/images/head.png')}}" alt=""></span>
                                <span style="margin-left:10px;">{{$hval->username}}</span>
                            </a>    
                        </div>
                    </li>
                    <li>@if($hval->direction == 0)正@else反@endif向</li>
                    <li>{{$hval->dealcounts}}</li>
                    <li><span>{{date('H:i:s',$hval->latelyordertime)}}</span>
                        <span>{{date('Y-m-d',$hval->latelyordertime)}}</span>
                    </li>
                    <li style="color: #fb405a;">{{round($hval->max_final_point,2)}}</li>
                    <li style="color: #89ff29;">{{round($hval->min_final_point,2)}}</li>
                    <li @if($hval->zong_final_point > 0) style="color: #fb405a;" @else style="color: #89ff29;" @endif>{{round($hval->zong_final_point,2)}}</li>
                    <li @if($hval->avg_final_point > 0) style="color: #fb405a;" @else style="color: #89ff29;" @endif>{{round($hval->avg_final_point,2)}}</li>
                </ul>
            </div>
        @endforeach
        <!-- 分页 -->
        @if($totalpage != 0)
        <div class="L_page">
            @if($page == 1 || $page == 0)
                <span class="fpage">上一页</span>
            @else
                <span class="fpage" onclick="gotohistory(0,{{$page}},{{$type}})" style='background: #3b9ce0;'>上一页</span>
            @endif
            &nbsp;
            <span>{{ $page }}</span>
            &nbsp;
            @if($page != $totalpage && $page<$totalpage)
                <span class="fpage" onclick="gotohistory(1,{{$page}},{{$type}})" style='background: #3b9ce0;'>下一页</span>
            @else
                <span class="fpage">下一页</span>
            @endif
            &nbsp;
            <span>共&nbsp;<b>{{ $totalpage }}</b>&nbsp;页</span>
        </div>
        @endif
    </div>
    @endif
</div>
